package com.ineatconseil.yougo.components.security;

import org.apache.tapestry5.corelib.base.AbstractConditional;
import org.apache.tapestry5.ioc.annotations.Inject;

import com.ineatconseil.yougo.services.auth.Authenticator;

/**
 * Checks if the user is logged in.
 * 
 * @author johanblo
 */
public class Authenticated extends AbstractConditional {

	@Inject
	private Authenticator authenticator;

	@Override
	protected boolean test() {
		return authenticator.isLoggedIn();
	}

}
